export const constantRoute = [
  {
    //登录
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login',
    meta: {
      title: '登录',
      hidden: true,
      icon: 'Promotion',
    },
  },
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: {
      title: '首页',
      hidden: false,
      icon: 'HomeFilled',
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icon: 'HomeFilled',
        },
      },
    ],
  },
  {
    path: '/charts',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '图表展示',
      hidden: false,
      icon: 'HelpFilled',
    },
    redirect: '/charts',
    children: [
      {
        path: '/charts',
        component: () => import('@/views/charts/index.vue'),
        meta: {
          title: '图表展示',
          hidden: false,
          icon: 'Promotion',
        },
      },
    ],
  },
  {
    path: '/screen',
    component: () => import('@/views/screen/index.vue'),
    meta: {
      title: '图表展示',
      hidden: false,
      icon: 'HelpFilled',
    },
    redirect: '/screen',
    children: [
      {
        path: '/screen',
        component: () => import('@/views/screen/index.vue'),
        meta: {
          title: '数据大屏',
          hidden: false,
          icon: 'Promotion',
        },
      },
    ],
  },
  {
    path: '/user',
    component: () => import('@/layout/index.vue'),
    name: 'user',
    meta: {
      title: '用户管理',
      hidden: false,
      icon: 'UserFilled',
    },
    redirect: '/user',
    children: [
      {
        path: '/user',
        component: () => import('@/views/user/index.vue'),
        meta: {
          title: '用户列表',
          hidden: false,
          icon: 'User',
        },
      },
    ],
  },
  {
    path: '/food',
    component: () => import('@/layout/index.vue'),
    name: 'food',
    meta: {
      title: '小吃管理',
      hidden: false,
      icon: 'ShoppingTrolley',
    },
    redirect: '/food',
    children: [
      {
        path: '/food',
        component: () => import('@/views/food/index.vue'),
        meta: {
          title: '小吃列表',
          hidden: false,
          icon: 'Grid',
        },
      },
      {
        path: '/food/save',
        component: () => import('@/views/food/save.vue'),
        meta: {
          title: '添加小吃',
          hidden: false,
          icon: 'Edit',
        },
      },
      {
        path: '/food/edit/:id',
        component: () => import('@/views/food/save.vue'),
        meta: { title: '修改小吃', hidden: true },
      },
    ],
  },
  {
    path: '/catalog',
    component: () => import('@/layout/index.vue'),
    name: 'catalog',
    meta: {
      title: '分类管理',
      hidden: false,
      icon: 'MenuIcon',
    },
    redirect: '/catalog',
    children: [
      {
        path: '/catalog',
        component: () => import('@/views/catalog/index.vue'),
        meta: {
          title: '分类管理',
          hidden: false,
          icon: 'MenuIcon',
        },
      },
      {
        path: '/catalog/upload',
        component: () => import('@/views/catalog/upload.vue'),
        meta: {
          title: '分类管理',
          hidden: false,
          icon: 'ElementPlus',
        },
      },
    ],
  },
  {
    path: '/scenicSpots',
    component: () => import('@/layout/index.vue'),
    name: 'scenicSpots',
    meta: {
      title: '景点管理',
      hidden: false,
      icon: 'Operation',
    },
    redirect: '/scenicSpots',
    children: [
      {
        path: '/scenicSpots',
        component: () => import('@/views/scenicSpots/index.vue'),
        meta: {
          title: '景点列表',
          hidden: false,
          icon: 'Grid',
        },
      },
      {
        path: '/scenicSpots/save',
        component: () => import('@/views/scenicSpots/save.vue'),
        meta: {
          title: '添加景点',
          hidden: false,
          icon: 'Edit',
        },
      },
      {
        path: '/scenicSpots/edit/:id',
        name: '修改景点',
        component: () => import('@/views/scenicSpots/save.vue'),
        meta: { title: '修改景点', hidden: true },
      },
    ],
  },
  {
    path: '/hotel',
    component: () => import('@/layout/index.vue'),
    name: 'hotel',
    meta: {
      title: '酒店管理',
      hidden: false,
      icon: 'School',
    },
    redirect: '/hotel',
    children: [
      {
        path: '/hotel',
        component: () => import('@/views/hotel/index.vue'),
        meta: {
          title: '酒店列表',
          hidden: false,
          icon: 'Grid',
        },
      },
      {
        path: '/hotel/save',
        component: () => import('@/views/hotel/save.vue'),
        meta: {
          title: '添加酒店',
          hidden: false,
          icon: 'Edit',
        },
      },
      {
        path: '/hotel/edit/:id',
        name: '修改酒店',
        component: () => import('@/views/hotel/save.vue'),
        meta: { title: '修改景点', hidden: true },
      },
    ],
  },

]
